<template>
  <div class="heads">
    <van-search v-model="value" show-action placeholder="请输入搜索关键词">
      <template #action>
        <div @click="onSearch">取消</div>
      </template>
    </van-search>
    <div class="search-history">
      <div class="lef"><span>搜索历史</span></div>
      <div class="box1">
        <div class="ret">
          <span style="color: #9d9ea0">全部删除</span>
          &nbsp;
          <span style="color: #9d9ea0">完成</span>
        </div>
        <van-icon color="#9d9ea0" name="delete-o" />
      </div>
    </div>
  </div>
</template>
<script>
import { Search } from "vant";
import { Toast } from "vant";
export default {
  name: "search",
  data() {
    return {
      value: "",
    };
  },
  mounted() {},
  methods: {
    onSearch() {
      this.$router.go(-1);
    },
  },
  components: {
    [Search.name]: Search,
    [Toast.name]: Toast,
  },
};
</script>
<style lang="less" scope>
.heads {
  background-color: @color3;
  height: @height;
  .search-history {
    width: 100%;
    height: 60px;
    background-color: @color2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }
  .box1 {
    display: flex;
    flex-direction: column;
  }
}
</style>